﻿using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using LibKetoan;
using LibDuoc;

namespace Ketoan
{
	/// <summary>
	/// Summary description for Form1.
	/// </summary>
	public class frmMain : System.Windows.Forms.Form
	{
		private LibKetoan.AccessData a=new LibKetoan.AccessData();
        private LibDuoc.AccessData d = new LibDuoc.AccessData();
		private string s_userid="",s_right="",s_mmyy="1208",s_ngay="",s_chuong="",s_lk="",s_chucnang="",s_lctug="",s_nghiepvu="";
		private string s_yyyy="";
		public int i_userid=0;
		private bool b_admin;
		private DataSet ds=new DataSet();
		private System.Windows.Forms.MainMenu mainMenu1;
		private System.Windows.Forms.MenuItem menuItem1;
		private System.Windows.Forms.MenuItem menuItem2;
		private System.Windows.Forms.MenuItem menuItem42;
		private System.Windows.Forms.MenuItem m121;
		private System.Windows.Forms.MenuItem m122;
		private System.Windows.Forms.MenuItem m123;
		private System.Windows.Forms.MenuItem m124;
		private System.Windows.Forms.MenuItem m125;
		private System.Windows.Forms.MenuItem m129;
		private System.Windows.Forms.MenuItem m611;
		private System.Windows.Forms.MenuItem m62;
		private System.Windows.Forms.MenuItem m64;
		private System.Windows.Forms.MenuItem m66;
		private System.Windows.Forms.MenuItem m67;
		private System.Windows.Forms.MenuItem m68;
		private System.Windows.Forms.MenuItem m70;
		private System.Windows.Forms.MenuItem m71;
		private System.Windows.Forms.MenuItem m72;
		private System.Windows.Forms.MenuItem m73;
		private System.Windows.Forms.MenuItem m74;
		private System.Windows.Forms.MenuItem m75;
		private System.Windows.Forms.MenuItem m76;
		private System.Windows.Forms.MenuItem m77;
		private System.Windows.Forms.MenuItem m79;
		private System.Windows.Forms.MenuItem m80;
		private System.Windows.Forms.MenuItem m85;
		private System.Windows.Forms.MenuItem m86;
		private System.Windows.Forms.MenuItem m87;
		private System.Windows.Forms.MenuItem m88;
		private System.Windows.Forms.MenuItem m89;
		private System.Windows.Forms.MenuItem m90;
		private System.Windows.Forms.MenuItem m91;
		private System.Windows.Forms.MenuItem m99;
		private System.Windows.Forms.MenuItem m100;
		private System.Windows.Forms.MenuItem m101;
		private System.Windows.Forms.MenuItem m102;
		private System.Windows.Forms.MenuItem m104;
		private System.Windows.Forms.MenuItem m9;
		private System.Windows.Forms.MenuItem m10;
		private System.Windows.Forms.MenuItem m12;
		private System.Windows.Forms.MenuItem m13;
		private System.Windows.Forms.MenuItem m15;
		private System.Windows.Forms.MenuItem m16;
		private System.Windows.Forms.MenuItem m17;
		private System.Windows.Forms.MenuItem m20;
		private System.Windows.Forms.MenuItem m22;
		private System.Windows.Forms.MenuItem m23;
		private System.Windows.Forms.MenuItem m108;
		private System.Windows.Forms.MenuItem m24;
		private System.Windows.Forms.MenuItem m36;
		private System.Windows.Forms.MenuItem m37;
		private System.Windows.Forms.MenuItem m38;
		private System.Windows.Forms.MenuItem m39;
		private System.Windows.Forms.MenuItem m40;
		private System.Windows.Forms.MenuItem m41;
		private System.Windows.Forms.MenuItem m42;
		private System.Windows.Forms.MenuItem m43;
		private System.Windows.Forms.MenuItem m44;
        private System.Windows.Forms.MenuItem m45;
		private System.Windows.Forms.MenuItem m126;
		private System.Windows.Forms.MenuItem m49;
		private System.Windows.Forms.MenuItem m50;
		private System.Windows.Forms.MenuItem m51;
		private System.Windows.Forms.MenuItem m52;
		private System.Windows.Forms.MenuItem m53;
		private System.Windows.Forms.MenuItem m54;
		private System.Windows.Forms.MenuItem m55;
		private System.Windows.Forms.MenuItem m56;
		private System.Windows.Forms.MenuItem m57;
		private System.Windows.Forms.MenuItem m58;
		private System.Windows.Forms.MenuItem m59;
		private System.Windows.Forms.MenuItem m109;
		private System.Windows.Forms.MenuItem m120;
		private System.Windows.Forms.MenuItem m127;
		private System.Windows.Forms.MenuItem m128;
		private System.Windows.Forms.MenuItem m130;
		private System.Windows.Forms.MenuItem m92;
		private System.Windows.Forms.MenuItem m93;
		private System.Windows.Forms.MenuItem m95;
		private System.Windows.Forms.MenuItem m96;
		private System.Windows.Forms.MenuItem m97;
		private System.Windows.Forms.MenuItem m98;
		private System.Windows.Forms.MenuItem m25;
		private System.Windows.Forms.MenuItem m26;
		private System.Windows.Forms.MenuItem m28;
		private System.Windows.Forms.MenuItem m29;
		private System.Windows.Forms.MenuItem m31;
		private System.Windows.Forms.MenuItem m32;
		private System.Windows.Forms.MenuItem m33;
		private System.Windows.Forms.MenuItem m1;
		private System.Windows.Forms.MenuItem m2;
		private System.Windows.Forms.MenuItem m3;
		private System.Windows.Forms.MenuItem m4;
		private System.Windows.Forms.MenuItem m5;
		private System.Windows.Forms.MenuItem m6;
		private System.Windows.Forms.MenuItem m7;
		private System.Windows.Forms.MenuItem m107;
		private System.Windows.Forms.MenuItem m34;
		private System.Windows.Forms.MenuItem m35;
		private System.Windows.Forms.MenuItem m131;
		private System.Windows.Forms.MenuItem m19;
		private System.Windows.Forms.MenuItem m27;
		private System.Windows.Forms.MenuItem m63;
		private System.Windows.Forms.MenuItem m65;
		private System.Windows.Forms.MenuItem m69;
		private System.Windows.Forms.MenuItem m83;
		private System.Windows.Forms.MenuItem m94;
		private System.Windows.Forms.MenuItem menuItem21;
		private System.Windows.Forms.MenuItem menuItem22;
		private System.Windows.Forms.MenuItem menuItem23;
		private System.Windows.Forms.MenuItem menuItem24;
		private System.Windows.Forms.MenuItem menuItem25;
		private System.Windows.Forms.MenuItem menuItem26;
		private System.Windows.Forms.MenuItem menuItem3;
		private System.Windows.Forms.MenuItem menuItem4;
		private System.Windows.Forms.MenuItem menuItem5;
		private System.Windows.Forms.MenuItem menuItem6;
		private System.Windows.Forms.MenuItem menuItem61;
		private System.Windows.Forms.MenuItem menuItem62;
		private System.Windows.Forms.MenuItem menuItem7;
		private System.Windows.Forms.MenuItem menuItem8;
		private System.Windows.Forms.MenuItem m105;
		private System.Windows.Forms.MenuItem m106;
		private System.Windows.Forms.MenuItem m103;
		private System.Windows.Forms.MenuItem menuItem9;
		private System.Windows.Forms.MenuItem menuItem10;
        private System.Windows.Forms.MenuItem menuItem11;
        private MenuItem m78;
        private MenuItem menuItem12;
        private MenuItem menuItem13;
        private MenuItem menuItem14;
        private IContainer components;

		public frmMain()
		{			
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();
			//if (System.IO.File.Exists(a.Thongso("hinh").Trim()))
			//	this.BackgroundImage=Image.FromFile(a.Thongso("hinh").Trim());
			/*if (Screen.PrimaryScreen.WorkingArea.Width <= 800)
				if (System.IO.File.Exists("khottb_800.jpg")) this.BackgroundImage=Image.FromFile("khottb_800.jpg");
			*/
			this.Text=a.Msg;
			//this.menuItem17.Text = "&2. About "+a.Msg;
			//
			// TODO: Add any constructor code after InitializeComponent call
			//
		}

		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if (components != null) 
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
            this.components = new System.ComponentModel.Container();
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmMain));
            this.mainMenu1 = new System.Windows.Forms.MainMenu(this.components);
            this.menuItem1 = new System.Windows.Forms.MenuItem();
            this.m1 = new System.Windows.Forms.MenuItem();
            this.m2 = new System.Windows.Forms.MenuItem();
            this.m3 = new System.Windows.Forms.MenuItem();
            this.m4 = new System.Windows.Forms.MenuItem();
            this.m5 = new System.Windows.Forms.MenuItem();
            this.m6 = new System.Windows.Forms.MenuItem();
            this.m7 = new System.Windows.Forms.MenuItem();
            this.m107 = new System.Windows.Forms.MenuItem();
            this.m124 = new System.Windows.Forms.MenuItem();
            this.menuItem11 = new System.Windows.Forms.MenuItem();
            this.menuItem2 = new System.Windows.Forms.MenuItem();
            this.menuItem21 = new System.Windows.Forms.MenuItem();
            this.m9 = new System.Windows.Forms.MenuItem();
            this.m10 = new System.Windows.Forms.MenuItem();
            this.menuItem22 = new System.Windows.Forms.MenuItem();
            this.m12 = new System.Windows.Forms.MenuItem();
            this.m13 = new System.Windows.Forms.MenuItem();
            this.menuItem23 = new System.Windows.Forms.MenuItem();
            this.m15 = new System.Windows.Forms.MenuItem();
            this.m16 = new System.Windows.Forms.MenuItem();
            this.m17 = new System.Windows.Forms.MenuItem();
            this.menuItem12 = new System.Windows.Forms.MenuItem();
            this.menuItem24 = new System.Windows.Forms.MenuItem();
            this.m19 = new System.Windows.Forms.MenuItem();
            this.m20 = new System.Windows.Forms.MenuItem();
            this.menuItem25 = new System.Windows.Forms.MenuItem();
            this.m22 = new System.Windows.Forms.MenuItem();
            this.m23 = new System.Windows.Forms.MenuItem();
            this.m108 = new System.Windows.Forms.MenuItem();
            this.m24 = new System.Windows.Forms.MenuItem();
            this.m25 = new System.Windows.Forms.MenuItem();
            this.m26 = new System.Windows.Forms.MenuItem();
            this.m27 = new System.Windows.Forms.MenuItem();
            this.m28 = new System.Windows.Forms.MenuItem();
            this.m29 = new System.Windows.Forms.MenuItem();
            this.menuItem26 = new System.Windows.Forms.MenuItem();
            this.m31 = new System.Windows.Forms.MenuItem();
            this.m32 = new System.Windows.Forms.MenuItem();
            this.m33 = new System.Windows.Forms.MenuItem();
            this.m34 = new System.Windows.Forms.MenuItem();
            this.m35 = new System.Windows.Forms.MenuItem();
            this.m131 = new System.Windows.Forms.MenuItem();
            this.menuItem3 = new System.Windows.Forms.MenuItem();
            this.m36 = new System.Windows.Forms.MenuItem();
            this.m37 = new System.Windows.Forms.MenuItem();
            this.m38 = new System.Windows.Forms.MenuItem();
            this.m39 = new System.Windows.Forms.MenuItem();
            this.m40 = new System.Windows.Forms.MenuItem();
            this.m44 = new System.Windows.Forms.MenuItem();
            this.m45 = new System.Windows.Forms.MenuItem();
            this.m41 = new System.Windows.Forms.MenuItem();
            this.m42 = new System.Windows.Forms.MenuItem();
            this.m43 = new System.Windows.Forms.MenuItem();
            this.m126 = new System.Windows.Forms.MenuItem();
            this.menuItem4 = new System.Windows.Forms.MenuItem();
            this.m49 = new System.Windows.Forms.MenuItem();
            this.m50 = new System.Windows.Forms.MenuItem();
            this.m51 = new System.Windows.Forms.MenuItem();
            this.m52 = new System.Windows.Forms.MenuItem();
            this.m53 = new System.Windows.Forms.MenuItem();
            this.m54 = new System.Windows.Forms.MenuItem();
            this.m55 = new System.Windows.Forms.MenuItem();
            this.m56 = new System.Windows.Forms.MenuItem();
            this.m57 = new System.Windows.Forms.MenuItem();
            this.m58 = new System.Windows.Forms.MenuItem();
            this.m59 = new System.Windows.Forms.MenuItem();
            this.menuItem5 = new System.Windows.Forms.MenuItem();
            this.m109 = new System.Windows.Forms.MenuItem();
            this.menuItem13 = new System.Windows.Forms.MenuItem();
            this.m120 = new System.Windows.Forms.MenuItem();
            this.m122 = new System.Windows.Forms.MenuItem();
            this.m123 = new System.Windows.Forms.MenuItem();
            this.m127 = new System.Windows.Forms.MenuItem();
            this.m128 = new System.Windows.Forms.MenuItem();
            this.m130 = new System.Windows.Forms.MenuItem();
            this.menuItem6 = new System.Windows.Forms.MenuItem();
            this.menuItem61 = new System.Windows.Forms.MenuItem();
            this.m611 = new System.Windows.Forms.MenuItem();
            this.m62 = new System.Windows.Forms.MenuItem();
            this.m63 = new System.Windows.Forms.MenuItem();
            this.m64 = new System.Windows.Forms.MenuItem();
            this.m65 = new System.Windows.Forms.MenuItem();
            this.m66 = new System.Windows.Forms.MenuItem();
            this.m67 = new System.Windows.Forms.MenuItem();
            this.m68 = new System.Windows.Forms.MenuItem();
            this.m69 = new System.Windows.Forms.MenuItem();
            this.m70 = new System.Windows.Forms.MenuItem();
            this.m71 = new System.Windows.Forms.MenuItem();
            this.m72 = new System.Windows.Forms.MenuItem();
            this.m73 = new System.Windows.Forms.MenuItem();
            this.m74 = new System.Windows.Forms.MenuItem();
            this.m75 = new System.Windows.Forms.MenuItem();
            this.m76 = new System.Windows.Forms.MenuItem();
            this.m129 = new System.Windows.Forms.MenuItem();
            this.m77 = new System.Windows.Forms.MenuItem();
            this.m78 = new System.Windows.Forms.MenuItem();
            this.menuItem14 = new System.Windows.Forms.MenuItem();
            this.menuItem62 = new System.Windows.Forms.MenuItem();
            this.m79 = new System.Windows.Forms.MenuItem();
            this.m80 = new System.Windows.Forms.MenuItem();
            this.menuItem42 = new System.Windows.Forms.MenuItem();
            this.m83 = new System.Windows.Forms.MenuItem();
            this.m85 = new System.Windows.Forms.MenuItem();
            this.m86 = new System.Windows.Forms.MenuItem();
            this.m87 = new System.Windows.Forms.MenuItem();
            this.m121 = new System.Windows.Forms.MenuItem();
            this.m88 = new System.Windows.Forms.MenuItem();
            this.m89 = new System.Windows.Forms.MenuItem();
            this.m90 = new System.Windows.Forms.MenuItem();
            this.m91 = new System.Windows.Forms.MenuItem();
            this.m92 = new System.Windows.Forms.MenuItem();
            this.m93 = new System.Windows.Forms.MenuItem();
            this.m94 = new System.Windows.Forms.MenuItem();
            this.m95 = new System.Windows.Forms.MenuItem();
            this.m96 = new System.Windows.Forms.MenuItem();
            this.m105 = new System.Windows.Forms.MenuItem();
            this.m97 = new System.Windows.Forms.MenuItem();
            this.m125 = new System.Windows.Forms.MenuItem();
            this.m106 = new System.Windows.Forms.MenuItem();
            this.m98 = new System.Windows.Forms.MenuItem();
            this.menuItem10 = new System.Windows.Forms.MenuItem();
            this.menuItem7 = new System.Windows.Forms.MenuItem();
            this.m99 = new System.Windows.Forms.MenuItem();
            this.m100 = new System.Windows.Forms.MenuItem();
            this.m101 = new System.Windows.Forms.MenuItem();
            this.menuItem8 = new System.Windows.Forms.MenuItem();
            this.m102 = new System.Windows.Forms.MenuItem();
            this.m103 = new System.Windows.Forms.MenuItem();
            this.m104 = new System.Windows.Forms.MenuItem();
            this.menuItem9 = new System.Windows.Forms.MenuItem();
            this.SuspendLayout();
            // 
            // mainMenu1
            // 
            this.mainMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
            this.menuItem1,
            this.menuItem2,
            this.menuItem3,
            this.menuItem4,
            this.menuItem5,
            this.menuItem6,
            this.menuItem7,
            this.menuItem8,
            this.menuItem9});
            // 
            // menuItem1
            // 
            this.menuItem1.Index = 0;
            this.menuItem1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
            this.m1,
            this.m2,
            this.m3,
            this.m4,
            this.m5,
            this.m6,
            this.m7,
            this.m107,
            this.m124,
            this.menuItem11});
            this.menuItem1.MergeOrder = 9001;
            this.menuItem1.Text = "Nhập chứng từ";
            // 
            // m1
            // 
            this.m1.Index = 0;
            this.m1.MergeOrder = 1;
            this.m1.Text = "Kế toán tiền mặt";
            this.m1.Click += new System.EventHandler(this.m0_Click);
            // 
            // m2
            // 
            this.m2.Index = 1;
            this.m2.MergeOrder = 2;
            this.m2.Text = "Kế toán ngân hàng - kho bạc";
            this.m2.Click += new System.EventHandler(this.m1_Click);
            // 
            // m3
            // 
            this.m3.Index = 2;
            this.m3.MergeOrder = 3;
            this.m3.Text = "Kế toán vật tư hàng hóa";
            this.m3.Click += new System.EventHandler(this.m63_Click);
            // 
            // m4
            // 
            this.m4.Index = 3;
            this.m4.MergeOrder = 4;
            this.m4.Text = "Kế toán các nghiệp vụ khác";
            this.m4.Click += new System.EventHandler(this.m2_Click);
            // 
            // m5
            // 
            this.m5.Index = 4;
            this.m5.MergeOrder = 5;
            this.m5.Text = "Tìm kiếm chứng từ";
            this.m5.Click += new System.EventHandler(this.m3_Click);
            // 
            // m6
            // 
            this.m6.Index = 5;
            this.m6.MergeOrder = 6;
            this.m6.Text = "Lập chứng từ ghi sổ";
            this.m6.Click += new System.EventHandler(this.m4_Click);
            // 
            // m7
            // 
            this.m7.Index = 6;
            this.m7.MergeOrder = 7;
            this.m7.Text = "Bảng kê chứng từ đề nghị thanh toán tạm ứng kinh phí";
            this.m7.Click += new System.EventHandler(this.m65_Click);
            // 
            // m107
            // 
            this.m107.Index = 7;
            this.m107.MergeOrder = 107;
            this.m107.Text = "Dự toán được giao";
            this.m107.Click += new System.EventHandler(this.menuItem90_Click);
            // 
            // m124
            // 
            this.m124.Index = 8;
            this.m124.MergeOrder = 124;
            this.m124.Text = "Hợp đồng";
            this.m124.Click += new System.EventHandler(this.m124_Click);
            // 
            // menuItem11
            // 
            this.menuItem11.Index = 9;
            this.menuItem11.Text = "Cập nhật chứng từ viện phí";
            this.menuItem11.Click += new System.EventHandler(this.menuItem11_Click_1);
            // 
            // menuItem2
            // 
            this.menuItem2.Index = 1;
            this.menuItem2.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
            this.menuItem21,
            this.menuItem22,
            this.menuItem23,
            this.menuItem24,
            this.menuItem25,
            this.m24,
            this.m25,
            this.m26,
            this.m27,
            this.m28,
            this.m29,
            this.menuItem26,
            this.m33,
            this.m34,
            this.m35,
            this.m131});
            this.menuItem2.MergeOrder = 9002;
            this.menuItem2.Text = "Sổ kế toán";
            // 
            // menuItem21
            // 
            this.menuItem21.Index = 0;
            this.menuItem21.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
            this.m9,
            this.m10});
            this.menuItem21.MergeOrder = 9003;
            this.menuItem21.Text = "Sổ quỹ tiền mặt (mẫu số S11-H)";
            // 
            // m9
            // 
            this.m9.Index = 0;
            this.m9.MergeOrder = 9;
            this.m9.Text = "Sổ quỹ tiền mặt chi tiết";
            this.m9.Click += new System.EventHandler(this.menuItem11_Click);
            // 
            // m10
            // 
            this.m10.Index = 1;
            this.m10.MergeOrder = 10;
            this.m10.Text = "Sổ quỹ tiền mặt tổng hợp";
            this.m10.Click += new System.EventHandler(this.m6_Click);
            // 
            // menuItem22
            // 
            this.menuItem22.Index = 1;
            this.menuItem22.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
            this.m12,
            this.m13});
            this.menuItem22.MergeOrder = 9004;
            this.menuItem22.Text = "Sổ tiền gửi ngân hàng (mẫu số S12-H)";
            // 
            // m12
            // 
            this.m12.Index = 0;
            this.m12.MergeOrder = 12;
            this.m12.Text = "Sổ tiền gửi ngân hàng chi tiết";
            this.m12.Click += new System.EventHandler(this.m73_Click);
            // 
            // m13
            // 
            this.m13.Index = 1;
            this.m13.MergeOrder = 13;
            this.m13.Text = "Sổ tiền gửi ngân hàng tổng hợp";
            this.m13.Click += new System.EventHandler(this.m74_Click);
            // 
            // menuItem23
            // 
            this.menuItem23.Index = 2;
            this.menuItem23.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
            this.m15,
            this.m16,
            this.m17,
            this.menuItem12});
            this.menuItem23.MergeOrder = 9005;
            this.menuItem23.Text = "Sổ cái (mẫu số S03-H)";
            // 
            // m15
            // 
            this.m15.Index = 0;
            this.m15.MergeOrder = 15;
            this.m15.Text = "Sổ cái - chi tiết theo mục";
            this.m15.Click += new System.EventHandler(this.m70_Click);
            // 
            // m16
            // 
            this.m16.Index = 1;
            this.m16.MergeOrder = 16;
            this.m16.Text = "Sổ cái tổng hợp";
            this.m16.Click += new System.EventHandler(this.m71_Click);
            // 
            // m17
            // 
            this.m17.Index = 2;
            this.m17.MergeOrder = 17;
            this.m17.Text = "Sổ cái - S03b (Hình thức kế toán nhật ký chung)";
            this.m17.Click += new System.EventHandler(this.m72_Click);
            // 
            // menuItem12
            // 
            this.menuItem12.Index = 3;
            this.menuItem12.Text = "Sổ theo dõi hạng mức  kinh phí";
            this.menuItem12.Click += new System.EventHandler(this.menuItem12_Click_1);
            // 
            // menuItem24
            // 
            this.menuItem24.Index = 3;
            this.menuItem24.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
            this.m19,
            this.m20});
            this.menuItem24.MergeOrder = 9006;
            this.menuItem24.Text = "Chứng từ ghi sổ (mẫu số S02-H)";
            // 
            // m19
            // 
            this.m19.Index = 0;
            this.m19.MergeOrder = 19;
            this.m19.Text = "Chứng từ ghi sổ (mẫu số S02a-H)";
            this.m19.Click += new System.EventHandler(this.m69_Click);
            // 
            // m20
            // 
            this.m20.Index = 1;
            this.m20.MergeOrder = 20;
            this.m20.Text = "Sổ đăng ký chứng từ ghi sổ (mẫu số S02b-H)";
            this.m20.Click += new System.EventHandler(this.menuItem49_Click);
            // 
            // menuItem25
            // 
            this.menuItem25.Index = 4;
            this.menuItem25.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
            this.m22,
            this.m23,
            this.m108});
            this.menuItem25.MergeOrder = 9007;
            this.menuItem25.Text = "Sổ chi tiết các tài khoản (mấu số S33-H)";
            // 
            // m22
            // 
            this.m22.Index = 0;
            this.m22.MergeOrder = 22;
            this.m22.Text = "Sổ chi tiết các tài khoản (tài khoản công nợ)";
            this.m22.Click += new System.EventHandler(this.menuItem48_Click_1);
            // 
            // m23
            // 
            this.m23.Index = 1;
            this.m23.MergeOrder = 23;
            this.m23.Text = "Sổ chi tiết các tài khoản (Gom nhóm theo đối tượng)";
            this.m23.Click += new System.EventHandler(this.menuItem71_Click);
            // 
            // m108
            // 
            this.m108.Index = 2;
            this.m108.MergeOrder = 108;
            this.m108.Text = "Sổ chi tiết các tài khoản";
            this.m108.Click += new System.EventHandler(this.menuItem22_Click_1);
            // 
            // m24
            // 
            this.m24.Index = 5;
            this.m24.MergeOrder = 24;
            this.m24.Text = "Bảng tổng hợp công nợ";
            this.m24.Click += new System.EventHandler(this.m13_Click);
            // 
            // m25
            // 
            this.m25.Index = 6;
            this.m25.MergeOrder = 25;
            this.m25.Text = "Sổ theo dõi tạm ứng";
            this.m25.Click += new System.EventHandler(this.menuItem48_Click);
            // 
            // m26
            // 
            this.m26.Index = 7;
            this.m26.MergeOrder = 26;
            this.m26.Text = "Sổ chi tiết chi hoạt động (mẫu số S61-H)";
            this.m26.Click += new System.EventHandler(this.m17_Click);
            // 
            // m27
            // 
            this.m27.Index = 8;
            this.m27.MergeOrder = 27;
            this.m27.Text = "Sổ chi tiết chi dự án (mẫu số S62-H)";
            this.m27.Click += new System.EventHandler(this.m16_Click);
            // 
            // m28
            // 
            this.m28.Index = 9;
            this.m28.MergeOrder = 28;
            this.m28.Text = "Sổ theo dõi sử dụng nguồn kinh phí (mẫu số S42-H)";
            this.m28.Click += new System.EventHandler(this.m18_Click);
            // 
            // m29
            // 
            this.m29.Index = 10;
            this.m29.MergeOrder = 29;
            this.m29.Text = "Sổ tổng hợp sử dụng nguồn kinh phí (mấu số S43-H)";
            this.m29.Click += new System.EventHandler(this.m19_Click);
            // 
            // menuItem26
            // 
            this.menuItem26.Index = 11;
            this.menuItem26.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
            this.m31,
            this.m32});
            this.menuItem26.MergeOrder = 9008;
            this.menuItem26.Text = "Sổ theo dõi dự toán ngân sách (mẫu số S41-H)";
            // 
            // m31
            // 
            this.m31.Index = 0;
            this.m31.MergeOrder = 31;
            this.m31.Text = "Giao dự toán";
            this.m31.Click += new System.EventHandler(this.menuItem56_Click);
            // 
            // m32
            // 
            this.m32.Index = 1;
            this.m32.MergeOrder = 32;
            this.m32.Text = "Theo dõi nhận dự toán";
            this.m32.Click += new System.EventHandler(this.menuItem57_Click);
            // 
            // m33
            // 
            this.m33.Index = 12;
            this.m33.MergeOrder = 33;
            this.m33.Text = "Sổ theo dõi tạm ứng kinh phí kho bạc (mẫu số S72-H)";
            this.m33.Click += new System.EventHandler(this.menuItem59_Click);
            // 
            // m34
            // 
            this.m34.Index = 13;
            this.m34.MergeOrder = 34;
            this.m34.Text = "Sổ chi tiết các khoản thu (mẫu số S52-H)";
            this.m34.Click += new System.EventHandler(this.menuItem60_Click);
            // 
            // m35
            // 
            this.m35.Index = 14;
            this.m35.MergeOrder = 35;
            this.m35.Text = "Sổ chi phí sản xuất kinh doanh";
            // 
            // m131
            // 
            this.m131.Index = 15;
            this.m131.MergeOrder = 131;
            this.m131.Text = "Bảng tổng hợp chứng từ (mẫu số S23-H)";
            this.m131.Click += new System.EventHandler(this.menuItem92_Click_1);
            // 
            // menuItem3
            // 
            this.menuItem3.Index = 2;
            this.menuItem3.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
            this.m36,
            this.m37,
            this.m38,
            this.m39,
            this.m40,
            this.m44,
            this.m45,
            this.m41,
            this.m42,
            this.m43,
            this.m126});
            this.menuItem3.MergeOrder = 9009;
            this.menuItem3.Text = "Báo cáo tài chính";
            // 
            // m36
            // 
            this.m36.Index = 0;
            this.m36.MergeOrder = 36;
            this.m36.Text = "Bảng cân đối tài khoản (mẫu số B01-H)";
            this.m36.Click += new System.EventHandler(this.menuItem66_Click);
            // 
            // m37
            // 
            this.m37.Index = 1;
            this.m37.MergeOrder = 37;
            this.m37.Text = "Bảng tổng hợp tình hình KP và Quyết toán KP đã sử dụng phần I (mấu số B02-H)";
            this.m37.Click += new System.EventHandler(this.menuItem10_Click);
            // 
            // m38
            // 
            this.m38.Index = 2;
            this.m38.MergeOrder = 38;
            this.m38.Text = "Bảng tổng hợp tình hình KP và Quyết toán KP đã sử dụng phần II (mấu số B02-H)";
            this.m38.Click += new System.EventHandler(this.menuItem63_Click);
            // 
            // m39
            // 
            this.m39.Index = 3;
            this.m39.MergeOrder = 39;
            this.m39.Text = "Báo cáo chi tiết kinh phí hoạt động (mẫu số F02-1H)";
            this.m39.Click += new System.EventHandler(this.menuItem64_Click);
            // 
            // m40
            // 
            this.m40.Index = 4;
            this.m40.MergeOrder = 40;
            this.m40.Text = "Báo cáo chi tiết kinh phí dự án (mấu số F02-2H)";
            this.m40.Click += new System.EventHandler(this.menuItem65_Click);
            // 
            // m44
            // 
            this.m44.Index = 5;
            this.m44.MergeOrder = 44;
            this.m44.Text = "Bảng đối chiếu dự toán kinh phí ngân sách tại kho bạc nhà nước (mẫu số F02-3aH)";
            this.m44.Click += new System.EventHandler(this.m83_Click);
            // 
            // m45
            // 
            this.m45.Index = 6;
            this.m45.MergeOrder = 45;
            this.m45.Text = "Bảng đối chiếu tình hình tạm ứng và thanh toán tạm ứng kinh phí ngân sách tại KBN" +
                "N (mẫu số F02-3bH)";
            this.m45.Click += new System.EventHandler(this.menuItem72_Click);
            // 
            // m41
            // 
            this.m41.Index = 7;
            this.m41.MergeOrder = 41;
            this.m41.Text = "Báo cáo thu chi hoạt động sự nghiệp và HĐ SXKD (mấu số B03-H)";
            this.m41.Click += new System.EventHandler(this.menuItem67_Click);
            // 
            // m42
            // 
            this.m42.Index = 8;
            this.m42.MergeOrder = 42;
            this.m42.Text = "Báo cáo tổng hợp tăng giảm tài sản cố định (mẫu số B04-H)";
            this.m42.Click += new System.EventHandler(this.menuItem68_Click);
            // 
            // m43
            // 
            this.m43.Index = 9;
            this.m43.MergeOrder = 43;
            this.m43.Text = "Báo cáo số kinh phí chưa sử dụng năm trước chuyển sang (B05-H)";
            this.m43.Click += new System.EventHandler(this.menuItem69_Click);
            // 
            // m126
            // 
            this.m126.Index = 10;
            this.m126.MergeOrder = 126;
            this.m126.Text = "Thuyết minh báo cáo tài chính (mấu số B06-H)";
            this.m126.Click += new System.EventHandler(this.menuItem93_Click_1);
            // 
            // menuItem4
            // 
            this.menuItem4.Index = 3;
            this.menuItem4.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
            this.m49,
            this.m50,
            this.m51,
            this.m52,
            this.m53,
            this.m54,
            this.m55,
            this.m56,
            this.m57,
            this.m58,
            this.m59});
            this.menuItem4.MergeOrder = 9010;
            this.menuItem4.Text = "Báo cáo doanh nghiệp";
            // 
            // m49
            // 
            this.m49.Index = 0;
            this.m49.MergeOrder = 49;
            this.m49.Text = "Sổ nhật ký thu tiền";
            this.m49.Click += new System.EventHandler(this.menuItem73_Click);
            // 
            // m50
            // 
            this.m50.Index = 1;
            this.m50.MergeOrder = 50;
            this.m50.Text = "Sổ nhật ký chi tiền";
            this.m50.Click += new System.EventHandler(this.menuItem74_Click);
            // 
            // m51
            // 
            this.m51.Index = 2;
            this.m51.MergeOrder = 51;
            this.m51.Text = "Sổ nhật ký mua hàng";
            this.m51.Click += new System.EventHandler(this.menuItem75_Click);
            // 
            // m52
            // 
            this.m52.Index = 3;
            this.m52.MergeOrder = 52;
            this.m52.Text = "Sổ nhật ký bán hàng";
            this.m52.Click += new System.EventHandler(this.menuItem76_Click);
            // 
            // m53
            // 
            this.m53.Index = 4;
            this.m53.MergeOrder = 53;
            this.m53.Text = "Sổ chi tiết thanh toán với người mua (Người bán) (S31-DN)";
            this.m53.Click += new System.EventHandler(this.menuItem77_Click);
            // 
            // m54
            // 
            this.m54.Index = 5;
            this.m54.MergeOrder = 54;
            this.m54.Text = "Sổ chi tiết tiền vay (S34-DN)";
            this.m54.Click += new System.EventHandler(this.menuItem78_Click);
            // 
            // m55
            // 
            this.m55.Index = 6;
            this.m55.MergeOrder = 55;
            this.m55.Text = "Sổ chi tiết bán hàng (S35-DN)";
            this.m55.Click += new System.EventHandler(this.menuItem79_Click);
            // 
            // m56
            // 
            this.m56.Index = 7;
            this.m56.MergeOrder = 56;
            this.m56.Text = "Sổ chi phí sản xuất - kinh doanh (S36-DN)";
            this.m56.Click += new System.EventHandler(this.menuItem81_Click);
            // 
            // m57
            // 
            this.m57.Index = 8;
            this.m57.MergeOrder = 57;
            this.m57.Text = "Sổ tổng hợp chi phí";
            this.m57.Click += new System.EventHandler(this.menuItem82_Click);
            // 
            // m58
            // 
            this.m58.Index = 9;
            this.m58.MergeOrder = 58;
            this.m58.Text = "Sổ chi tiết chi phí";
            this.m58.Click += new System.EventHandler(this.menuItem83_Click);
            // 
            // m59
            // 
            this.m59.Index = 10;
            this.m59.MergeOrder = 59;
            this.m59.Text = "Tổng hợp tài khoản tiền gửi";
            this.m59.Click += new System.EventHandler(this.menuItem84_Click);
            // 
            // menuItem5
            // 
            this.menuItem5.Index = 4;
            this.menuItem5.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
            this.m109,
            this.menuItem13,
            this.m120,
            this.m122,
            this.m123,
            this.m127,
            this.m128,
            this.m130});
            this.menuItem5.MergeOrder = 9011;
            this.menuItem5.Text = "Báo cáo bệnh viện";
            // 
            // m109
            // 
            this.m109.Index = 0;
            this.m109.MergeOrder = 109;
            this.m109.Text = "Báo cáo chi tiết thu ";
            this.m109.Click += new System.EventHandler(this.menuItem94_Click);
            // 
            // menuItem13
            // 
            this.menuItem13.Index = 1;
            this.menuItem13.Text = "Báo cáo chi tiết chi";
            this.menuItem13.Click += new System.EventHandler(this.menuItem13_Click_1);
            // 
            // m120
            // 
            this.m120.Index = 2;
            this.m120.MergeOrder = 120;
            this.m120.Text = "Bảng kê chứng từ gốc cùng loại";
            this.m120.Click += new System.EventHandler(this.menuItem95_Click);
            // 
            // m122
            // 
            this.m122.Index = 3;
            this.m122.MergeOrder = 122;
            this.m122.Text = "Báo cáo công nợ theo kho";
            this.m122.Click += new System.EventHandler(this.m122_Click);
            // 
            // m123
            // 
            this.m123.Index = 4;
            this.m123.MergeOrder = 123;
            this.m123.Text = "Báo cáo công nợ theo hợp đồng";
            // 
            // m127
            // 
            this.m127.Index = 5;
            this.m127.MergeOrder = 127;
            this.m127.Text = "Bảng tổng hợp tình hình KP và Quyết toán KP đã sử dụng phần I(Đặt thù BV)";
            this.m127.Click += new System.EventHandler(this.menuItem96_Click);
            // 
            // m128
            // 
            this.m128.Index = 6;
            this.m128.MergeOrder = 128;
            this.m128.Text = "Bảng tổng hợp tình hình KP và Quyết toán KP đã sử dụng phần II(Đặt thù BV)";
            this.m128.Click += new System.EventHandler(this.menuItem97_Click);
            // 
            // m130
            // 
            this.m130.Index = 7;
            this.m130.MergeOrder = 130;
            this.m130.Text = "Sổ chi tiết chi hoạt động";
            this.m130.Click += new System.EventHandler(this.menuItem98_Click);
            // 
            // menuItem6
            // 
            this.menuItem6.Index = 5;
            this.menuItem6.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
            this.menuItem61,
            this.menuItem62,
            this.menuItem42,
            this.m83,
            this.m85,
            this.m86,
            this.m87,
            this.m121,
            this.m88,
            this.m89,
            this.m90,
            this.m91,
            this.m92,
            this.m93,
            this.m94,
            this.m95,
            this.m96,
            this.m105,
            this.m97,
            this.m125,
            this.m106,
            this.m98,
            this.menuItem10});
            this.menuItem6.MergeOrder = 9012;
            this.menuItem6.Text = "Tiện ích";
            // 
            // menuItem61
            // 
            this.menuItem61.Index = 0;
            this.menuItem61.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
            this.m611,
            this.m62,
            this.m63,
            this.m64,
            this.m65,
            this.m66,
            this.m67,
            this.m68,
            this.m69,
            this.m70,
            this.m71,
            this.m72,
            this.m73,
            this.m74,
            this.m75,
            this.m76,
            this.m129,
            this.m77,
            this.m78,
            this.menuItem14});
            this.menuItem61.MergeOrder = 9013;
            this.menuItem61.Text = "Danh mục";
            // 
            // m611
            // 
            this.m611.Index = 0;
            this.m611.MergeOrder = 61;
            this.m611.Text = "Hệ thống tài khoản";
            this.m611.Click += new System.EventHandler(this.menuItem28_Click);
            // 
            // m62
            // 
            this.m62.Index = 1;
            this.m62.MergeOrder = 62;
            this.m62.Text = "Tài khoản mở tại ngân hàng, kho bạc";
            this.m62.Click += new System.EventHandler(this.menuItem29_Click);
            // 
            // m63
            // 
            this.m63.Index = 2;
            this.m63.MergeOrder = 63;
            this.m63.Text = "Loại khoản";
            this.m63.Click += new System.EventHandler(this.menuItem30_Click);
            // 
            // m64
            // 
            this.m64.Index = 3;
            this.m64.MergeOrder = 64;
            this.m64.Text = "Bộ phận";
            this.m64.Click += new System.EventHandler(this.menuItem31_Click);
            // 
            // m65
            // 
            this.m65.Index = 4;
            this.m65.MergeOrder = 65;
            this.m65.Text = "Nguồn kinh phí";
            this.m65.Click += new System.EventHandler(this.menuItem32_Click);
            // 
            // m66
            // 
            this.m66.Index = 5;
            this.m66.MergeOrder = 66;
            this.m66.Text = "Dự án";
            this.m66.Click += new System.EventHandler(this.menuItem33_Click);
            // 
            // m67
            // 
            this.m67.Index = 6;
            this.m67.MergeOrder = 67;
            this.m67.Text = "Mục, tiểu mục";
            this.m67.Click += new System.EventHandler(this.menuItem34_Click);
            // 
            // m68
            // 
            this.m68.Index = 7;
            this.m68.MergeOrder = 68;
            this.m68.Text = "Nhân viên";
            this.m68.Click += new System.EventHandler(this.menuItem35_Click);
            // 
            // m69
            // 
            this.m69.Index = 8;
            this.m69.MergeOrder = 69;
            this.m69.Text = "Khách hàng";
            this.m69.Click += new System.EventHandler(this.menuItem36_Click);
            // 
            // m70
            // 
            this.m70.Index = 9;
            this.m70.MergeOrder = 70;
            this.m70.Text = "Loại chứng từ";
            this.m70.Click += new System.EventHandler(this.menuItem37_Click);
            // 
            // m71
            // 
            this.m71.Index = 10;
            this.m71.MergeOrder = 71;
            this.m71.Text = "Tài khoản ghi đồng thời - dự toán ngân sách";
            this.m71.Click += new System.EventHandler(this.menuItem38_Click);
            // 
            // m72
            // 
            this.m72.Index = 11;
            this.m72.MergeOrder = 72;
            this.m72.Text = "Tài khoàn năm nay chuyển sang tài khoản năm trước";
            this.m72.Click += new System.EventHandler(this.menuItem39_Click);
            // 
            // m73
            // 
            this.m73.Index = 12;
            this.m73.MergeOrder = 73;
            this.m73.Text = "Quyết toán kinh phí đã sử dụng năm trước";
            this.m73.Click += new System.EventHandler(this.menuItem40_Click);
            // 
            // m74
            // 
            this.m74.Index = 13;
            this.m74.MergeOrder = 74;
            this.m74.Text = "Nhóm báo cáo";
            this.m74.Click += new System.EventHandler(this.m64_Click);
            // 
            // m75
            // 
            this.m75.Index = 14;
            this.m75.MergeOrder = 75;
            this.m75.Text = "Loại nguồn";
            this.m75.Click += new System.EventHandler(this.m66_Click);
            // 
            // m76
            // 
            this.m76.Index = 15;
            this.m76.MergeOrder = 76;
            this.m76.Text = "Nguồn";
            this.m76.Click += new System.EventHandler(this.m67_Click);
            // 
            // m129
            // 
            this.m129.Index = 16;
            this.m129.MergeOrder = 129;
            this.m129.Text = "Nguồn ngân sách";
            this.m129.Click += new System.EventHandler(this.menuItem27_Click_1);
            // 
            // m77
            // 
            this.m77.Index = 17;
            this.m77.MergeOrder = 77;
            this.m77.Text = "Lập công thức báo cáo tài chính";
            this.m77.Click += new System.EventHandler(this.m68_Click);
            // 
            // m78
            // 
            this.m78.Index = 18;
            this.m78.MergeOrder = 78;
            this.m78.Text = "Ngoại Tệ";
            this.m78.Click += new System.EventHandler(this.m78_Click);
            // 
            // menuItem14
            // 
            this.menuItem14.Index = 19;
            this.menuItem14.Text = "Tài sản cố định";
            this.menuItem14.Click += new System.EventHandler(this.menuItem14_Click_1);
            // 
            // menuItem62
            // 
            this.menuItem62.Index = 1;
            this.menuItem62.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
            this.m79,
            this.m80});
            this.menuItem62.MergeOrder = 9014;
            this.menuItem62.Text = "Khai báo số dư đầu năm";
            // 
            // m79
            // 
            this.m79.Index = 0;
            this.m79.MergeOrder = 79;
            this.m79.Text = "Số dư";
            this.m79.Click += new System.EventHandler(this.menuItem20_Click);
            // 
            // m80
            // 
            this.m80.Index = 1;
            this.m80.MergeOrder = 80;
            this.m80.Text = "Công nợ";
            this.m80.Click += new System.EventHandler(this.menuItem21_Click);
            // 
            // menuItem42
            // 
            this.menuItem42.Index = 2;
            this.menuItem42.MergeOrder = 82;
            this.menuItem42.Text = "Kiểm tra số dư cuối tháng";
            this.menuItem42.Click += new System.EventHandler(this.menuItem42_Click);
            // 
            // m83
            // 
            this.m83.Index = 3;
            this.m83.MergeOrder = 83;
            this.m83.Text = "Kiểm tra số phát sinh";
            this.m83.Click += new System.EventHandler(this.menuItem44_Click);
            // 
            // m85
            // 
            this.m85.Index = 4;
            this.m85.MergeOrder = 85;
            this.m85.Text = "Chuyển sổ";
            this.m85.Click += new System.EventHandler(this.menuItem43_Click);
            // 
            // m86
            // 
            this.m86.Index = 5;
            this.m86.MergeOrder = 86;
            this.m86.Text = "Thu nhập chứng từ phiếu nhập kho";
            this.m86.Click += new System.EventHandler(this.m61_Click);
            // 
            // m87
            // 
            this.m87.Index = 6;
            this.m87.MergeOrder = 87;
            this.m87.Text = "Thu nhập chứng từ phiếu xuất kho";
            this.m87.Click += new System.EventHandler(this.m95_Click);
            // 
            // m121
            // 
            this.m121.Index = 7;
            this.m121.MergeOrder = 121;
            this.m121.Text = "Thu nhập chứng từ viện phí";
            this.m121.Click += new System.EventHandler(this.m121_Click);
            // 
            // m88
            // 
            this.m88.Index = 8;
            this.m88.MergeOrder = 88;
            this.m88.Text = "Thông số hệ thống";
            this.m88.Click += new System.EventHandler(this.menuItem50_Click);
            // 
            // m89
            // 
            this.m89.Index = 9;
            this.m89.MergeOrder = 89;
            this.m89.Text = "Phân quyền theo bệnh viện sử dụng";
            this.m89.Click += new System.EventHandler(this.menuItem8_Click);
            // 
            // m90
            // 
            this.m90.Index = 10;
            this.m90.MergeOrder = 90;
            this.m90.Text = "Phân quyền sử dụng";
            this.m90.Click += new System.EventHandler(this.menuItem23_Click);
            // 
            // m91
            // 
            this.m91.Index = 11;
            this.m91.MergeOrder = 91;
            this.m91.Text = "Thay đổi mật khẩu";
            this.m91.Click += new System.EventHandler(this.menuItem24_Click);
            // 
            // m92
            // 
            this.m92.Index = 12;
            this.m92.MergeOrder = 92;
            this.m92.Text = "Nhật ký người dùng";
            this.m92.Click += new System.EventHandler(this.menuItem80_Click);
            // 
            // m93
            // 
            this.m93.Index = 13;
            this.m93.MergeOrder = 93;
            this.m93.Text = "Sao lưu số liệu";
            this.m93.Click += new System.EventHandler(this.menuItem25_Click);
            // 
            // m94
            // 
            this.m94.Index = 14;
            this.m94.MergeOrder = 94;
            this.m94.Text = "Đổi ngày";
            this.m94.Click += new System.EventHandler(this.menuItem104_Click);
            // 
            // m95
            // 
            this.m95.Index = 15;
            this.m95.MergeOrder = 95;
            this.m95.Text = "Tạo lại số liệu năm";
            this.m95.Click += new System.EventHandler(this.menuItem70_Click_1);
            // 
            // m96
            // 
            this.m96.Index = 16;
            this.m96.MergeOrder = 96;
            this.m96.Text = "Truy vấn theo câu lệnh SQL";
            this.m96.Click += new System.EventHandler(this.menuItem102_Click);
            // 
            // m105
            // 
            this.m105.Index = 17;
            this.m105.MergeOrder = 105;
            this.m105.Text = "-";
            // 
            // m97
            // 
            this.m97.Index = 18;
            this.m97.MergeOrder = 97;
            this.m97.Text = "Kết chuyển cuối kỳ";
            this.m97.Click += new System.EventHandler(this.menuItem86_Click);
            // 
            // m125
            // 
            this.m125.Index = 19;
            this.m125.MergeOrder = 125;
            this.m125.Text = "Kết xuất số liệu nộp Sở y tế";
            this.m125.Click += new System.EventHandler(this.m125_Click);
            // 
            // m106
            // 
            this.m106.Index = 20;
            this.m106.MergeOrder = 106;
            this.m106.Text = "-";
            // 
            // m98
            // 
            this.m98.Index = 21;
            this.m98.MergeOrder = 98;
            this.m98.Text = "Log Off";
            this.m98.Click += new System.EventHandler(this.menuItem27_Click);
            // 
            // menuItem10
            // 
            this.menuItem10.Index = 22;
            this.menuItem10.Text = "";
            // 
            // menuItem7
            // 
            this.menuItem7.Index = 6;
            this.menuItem7.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
            this.m99,
            this.m100,
            this.m101});
            this.menuItem7.MergeOrder = 9015;
            this.menuItem7.Text = "&A. Cửa sổ";
            this.menuItem7.Click += new System.EventHandler(this.menuItem4_Click);
            // 
            // m99
            // 
            this.m99.Index = 0;
            this.m99.MergeOrder = 99;
            this.m99.Text = "&1. Hiện cửa sổ theo chiều dọc";
            this.m99.Click += new System.EventHandler(this.menuItem12_Click);
            // 
            // m100
            // 
            this.m100.Index = 1;
            this.m100.MergeOrder = 100;
            this.m100.Text = "&2. Hiện cửa sổ theo chiều ngang";
            this.m100.Click += new System.EventHandler(this.menuItem13_Click);
            // 
            // m101
            // 
            this.m101.Index = 2;
            this.m101.MergeOrder = 101;
            this.m101.Text = "&3. Đóng tất cả các cửa sổ";
            this.m101.Click += new System.EventHandler(this.menuItem14_Click);
            // 
            // menuItem8
            // 
            this.menuItem8.Index = 7;
            this.menuItem8.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
            this.m102,
            this.m103,
            this.m104});
            this.menuItem8.MergeOrder = 9016;
            this.menuItem8.Text = "&B. Hướng dẫn";
            // 
            // m102
            // 
            this.m102.Index = 0;
            this.m102.MergeOrder = 102;
            this.m102.Text = "&1. Hướng dẫn sử dụng";
            // 
            // m103
            // 
            this.m103.Index = 1;
            this.m103.MergeOrder = 103;
            this.m103.Text = "-";
            // 
            // m104
            // 
            this.m104.Index = 2;
            this.m104.MergeOrder = 104;
            this.m104.Text = "&2. About";
            this.m104.Click += new System.EventHandler(this.menuItem17_Click);
            // 
            // menuItem9
            // 
            this.menuItem9.Index = 8;
            this.menuItem9.MergeOrder = 9017;
            this.menuItem9.Text = "&C. Kết thúc";
            this.menuItem9.Click += new System.EventHandler(this.menuItem6_Click);
            // 
            // frmMain
            // 
            this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
            this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));
            this.ClientSize = new System.Drawing.Size(784, 0);
            this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
            this.IsMdiContainer = true;
            this.Menu = this.mainMenu1;
            this.Name = "frmMain";
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
            this.Text = "Quản Lý Kế Toán .Net";
            this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
            this.Load += new System.EventHandler(this.frmMain_Load);
            this.ResumeLayout(false);

		}
		#endregion

		/// <summary>
		/// The main entry point for the application.
		/// </summary>
		[STAThread]
		static void Main() 
		{
			Application.Run(new frmMain());
		}

		private bool IsLoaded(string frm)
		{
			Form[] afrm=this.MdiChildren;
			foreach(Form f in afrm)
			{
				if(f.Name.Equals(frm)){f.Activate();return true;}
			}
			return false;
		}

		private void menuItem6_Click(object sender, System.EventArgs e)
		{
			if (MessageBox.Show ("Bạn có muốn kết thúc không ?",this.Text,MessageBoxButtons.YesNo, MessageBoxIcon.Question)== DialogResult.Yes)
			{
				a.set_current();
				Application.Exit();
			}
		}

		private void menuItem12_Click(object sender, System.EventArgs e)
		{
			this.LayoutMdi(System.Windows.Forms.MdiLayout.TileVertical);
		}

		private void menuItem13_Click(object sender, System.EventArgs e)
		{
			this.LayoutMdi(System.Windows.Forms.MdiLayout.TileHorizontal);
		}

		private void menuItem14_Click(object sender, System.EventArgs e)
		{
			Form[] charr= this.MdiChildren;  
			foreach (Form chform in charr) chform.Close();
		}

		private void frmMain_Load(object sender, System.EventArgs e)
		{
			Splasher.Show();			
			Splasher.Status = "CONNECTING TO ORACLE DATABASE SERVER ...";
			ds=a.get_data("select * from "+d.user+".d_dlogin where id=0");
			//Application.DoEvents();
			System.Threading.Thread.Sleep(1000);//2350
			Splasher.Close();
			frmLogin f=new frmLogin(a);
			f.ShowDialog(this);
			if (f.mUserid!="")
			{
				s_userid=f.mUserid;
				s_right=f.mRight;
				i_userid=f.iUserid;
				b_admin=f.bAdmin;
				s_chuong=f.mChuong;
				s_lk=f.mLk;
				s_chucnang=f.mChucnang;
				s_lctug=f.mLctug;
				s_nghiepvu=f.mNghiepvu;
				s_ngay=f.mNgay;
				s_mmyy=f.mMmyy;				
				s_yyyy=f.mNgay.Split('/')[2].ToString().Trim();
				//if (this.m60.Text!="Log Off") this.Text = a.Msg +" - " + s_ngay + " - " + s_userid.Trim() + "- Tháng" + " " + s_mmyy.Substring(0, 2) + "/20" + s_mmyy.Substring(2, 2);
			}
			else Application.Exit();
			gan_right();
		}



		private void menuItem17_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmAbout")) return;
			frmAbout f=new frmAbout("ketoan",f_get_menu());
			f.MdiParent=this;
			f.Show();		
		}

		private void menuItem27_Click(object sender, System.EventArgs e)
		{
			menuItem14_Click(null,null);
			frmLogin f=new frmLogin(a);
			f.ShowDialog(this);
			if (f.mUserid!="")
			{
				s_userid=f.mUserid;
				s_right=f.mRight;
				i_userid=f.iUserid;
				b_admin=f.bAdmin;
				s_chuong=f.mChuong;
				s_lk=f.mLk;
				s_chucnang=f.mChucnang;
				s_lctug=f.mLctug;
				s_nghiepvu=f.mNghiepvu;
				s_mmyy=f.mMmyy;
				s_ngay=f.mNgay;
				this.Text = a.Msg+ " - " + s_ngay + " - " + s_userid.Trim() + "- Tháng" + " " + s_mmyy.Substring(0, 2) + "/20" + s_mmyy.Substring(2, 2);
			}
			else Application.Exit();
			gan_right();
		}

		private void menuItem25_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmThumuc")) return;
			try
			{
				string s="";
				foreach(DataRow r in a.get_data("select ten from d_thongso where id=3").Tables[0].Rows)
				{
					s=r["ten"].ToString();
					break;
				}
				frmThumuc f=new frmThumuc(s,"Chọn thư mục sao lưu số liệu",1,0,s_mmyy);
				f.ShowDialog();
			}
			catch{}
		}

		private void menuItem102_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmTVuser")) return;
			frmTVuser f=new frmTVuser(a);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem104_Click(object sender, System.EventArgs e)
		{
			menuItem14_Click(null,null);
			frmDoingay f=new frmDoingay(a,s_mmyy,i_userid);
			f.ShowDialog();
			if (f.mMmyy!="")
			{
				s_mmyy=f.mMmyy;s_ngay=f.mNgay;
				this.Text = a.Msg+ " - " + s_ngay + " - " + s_userid.Trim() + "- Tháng" + " " + s_mmyy.Substring(0, 2) + "/20" + s_mmyy.Substring(2, 2);
			}
		}

		private void menuItem70_Click_1(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmTaouser")) return;
			frmTaouser f=new frmTaouser(a);
			f.MdiParent=this;
			f.Show();
		}

		private void gan_right()
		{
			int n = 0, t = 0;
			bool bx = false;
			for (int i = 0; i < this.mainMenu1.MenuItems.Count - 3; i++)
			{
				bx = false;

				for (int j = 0; j < this.mainMenu1.MenuItems[i].MenuItems.Count; j++)
				{

					if (this.mainMenu1.MenuItems[i].MenuItems[j].MenuItems.Count == 0)
					{
						if (this.mainMenu1.MenuItems[i].MenuItems[j].Text != "-")
						{
							this.mainMenu1.MenuItems[i].MenuItems[j].Visible = s_right.IndexOf(this.mainMenu1.MenuItems[i].MenuItems[j].MergeOrder.ToString().PadLeft(3, '0') + "+") != -1;
							if (!bx)
								bx = this.mainMenu1.MenuItems[i].MenuItems[j].Visible;
						}
						else
						{
							this.mainMenu1.MenuItems[i].MenuItems[j].Visible = false;
						}
					}
					else
					{
						n = 0;
						for (int k = 0; k < this.mainMenu1.MenuItems[i].MenuItems[j].MenuItems.Count; k++)
						{
							if (this.mainMenu1.MenuItems[i].MenuItems[j].MenuItems[k].MenuItems.Count == 0)
							{
								if (this.mainMenu1.MenuItems[i].MenuItems[j].MenuItems[k].Text != "-")
									this.mainMenu1.MenuItems[i].MenuItems[j].MenuItems[k].Visible = s_right.IndexOf(this.mainMenu1.MenuItems[i].MenuItems[j].MenuItems[k].MergeOrder.ToString().PadLeft(3, '0') + "+") != -1;
								else this.mainMenu1.MenuItems[i].MenuItems[j].MenuItems[k].Visible = false;
								n += (this.mainMenu1.MenuItems[i].MenuItems[j].MenuItems[k].Visible) ? 1 : 0;

							}
							else
							{
								t = 0;
								for (int s = 0; s < this.mainMenu1.MenuItems[i].MenuItems[j].MenuItems[k].MenuItems.Count; s++)
								{
									if (this.mainMenu1.MenuItems[i].MenuItems[j].MenuItems[k].MenuItems[s].Text != "-")
										this.mainMenu1.MenuItems[i].MenuItems[j].MenuItems[k].MenuItems[s].Visible = s_right.IndexOf(this.mainMenu1.MenuItems[i].MenuItems[j].MenuItems[k].MenuItems[s].MergeOrder.ToString().PadLeft(3, '0') + "+") != -1;
									else this.mainMenu1.MenuItems[i].MenuItems[j].MenuItems[k].MenuItems[s].Visible = false;
									t += (this.mainMenu1.MenuItems[i].MenuItems[j].MenuItems[k].MenuItems[s].Visible) ? 1 : 0;
								}
								this.mainMenu1.MenuItems[i].MenuItems[j].MenuItems[k].Visible = n != 0;

							}
						}
						this.mainMenu1.MenuItems[i].MenuItems[j].Visible = n != 0;
						if (!bx)
							bx = (n != 0) ? true : false;
					}
					this.mainMenu1.MenuItems[i].Visible = bx;

				}
			}

			this.m98.Text="Log Off "+s_userid.ToString().Trim();
			this.m98.Visible=true;
			this.m94.Visible=true;
			this.menuItem6.Visible=true;
			this.m89.Visible=true;
			if (s_userid==LibKetoan.AccessData.links_userid+LibKetoan.AccessData.links_pass)
			{
				this.menuItem6.Visible=true;
				this.m90.Visible=true;
				this.m89.Visible=true;
				this.m88.Visible=true;
				this.m98.Text="Log Off Administrator(Links)";
			}
			else 
				this.Text = a.Msg +" - " + s_ngay + "- Tháng" + " " + s_mmyy.Substring(0, 2) + "/20" + s_mmyy.Substring(2, 2);
		}

		private TreeNode f_get_menu()
		{
			TreeNode anode, anode1;
			anode = new TreeNode("Chức năng");
			anode.Tag = "menuChucnang";
			anode.Text = "Chức năng";
			foreach (MenuItem mi in this.mainMenu1.MenuItems)
			{
				MenuItem mnuitem = (MenuItem)(mi);
				if (mnuitem == menuItem7 || mnuitem == menuItem8 || mnuitem == menuItem9) break;

				anode1 = new TreeNode(mnuitem.Text.Replace("&", ""));
				anode1.Tag = mnuitem.MergeOrder.ToString().PadLeft(3, '0');
				anode.Nodes.Add(anode1);
				if (mnuitem.MenuItems.Count > 0)
				{
					f_Add_Node(anode1, mnuitem);
				}

			}
			anode.ExpandAll();
			return anode;
		}

		private void f_Add_Node(TreeNode v_node, MenuItem v_item)
		{
			TreeNode anode;
			foreach (MenuItem ait in v_item.MenuItems)
			{
				if (ait.GetType().ToString() == "System.Windows.Forms.MenuItem")
				{
					MenuItem amenu = (MenuItem)(ait);
					if (amenu.Text != "-")// && amenu != menuItem8)
					{
						anode = new TreeNode(amenu.Text.Replace("&", ""));
						anode.Tag = amenu.MergeOrder.ToString().PadLeft(3, '0');
						anode.Text = amenu.Text.Replace("&", "");
						v_node.Nodes.Add(anode);
						if (amenu.MenuItems.Count > 0)
						{
							f_Add_Node(anode, amenu);
						}
					}
				}
			}
		}

		private void menuItem24_Click(object sender, System.EventArgs e)
		{
			string s_userid=a.get_data("select userid from a_dlogin where id="+i_userid).Tables[0].Rows[0][0].ToString();
			string s_psw=a.get_data("select password_ from a_dlogin where id="+i_userid).Tables[0].Rows[0][0].ToString();
			frmUser f=new frmUser(a,a.get_data("select * from a_dlogin"),i_userid.ToString(),s_userid,s_psw,s_right,false);
			f.ShowDialog(this);
		}

		private void menuItem33_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmDmng")) return;
			frmDmng f=new frmDmng(a,s_mmyy,i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem42_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmKiemtrasd")) return;
			frmKiemtrasd f=new frmKiemtrasd(a,s_mmyy,i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem44_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmKiemtrafs")) return;
			frmKiemtrafs f=new frmKiemtrafs(a,s_mmyy,i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem43_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmChuyenso")) return;
			frmChuyenso f=new frmChuyenso(a,s_mmyy,i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void m0_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmNhapct")) return;
			frmNhapct f=new frmNhapct(a,s_mmyy,s_ngay,s_chuong,s_lk,s_lctug,s_nghiepvu,1,i_userid,"Chứng từ tiền mặt",b_admin,a.lctug_dutoanns_tm,0);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem20_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmSodu")) return;
			frmSodu f=new frmSodu(a,s_mmyy,s_chuong,s_lk,s_nghiepvu,i_userid,"Số dư năm 20"+s_mmyy.Substring(2),b_admin);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem21_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmCongno")) return;
			frmCongno f=new frmCongno(a,s_mmyy,s_chuong,s_lk,s_nghiepvu,i_userid,"Công nợ năm 20"+s_mmyy.Substring(2),b_admin);
			f.MdiParent=this;
			f.Show();
		}

		private void m2_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmNhapct")) return;
			frmNhapct f=new frmNhapct(a,s_mmyy,s_ngay,s_chuong,s_lk,LibKetoan.AccessData.lctug_k.ToString()+",",s_nghiepvu,LibKetoan.AccessData.chucnang_k,i_userid,"Chứng từ khác",b_admin,a.lctug_dutoanns,0);
			f.MdiParent=this;
			f.Show();		
		}

		private void m1_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmNhapng")) return;
			frmNhapng f=new frmNhapng(a,s_mmyy,s_ngay,s_chuong,s_lk,s_lctug,s_nghiepvu,2,i_userid,"Chứng từ ngân hàng - kho bạc",b_admin,a.lctug_dutoanns_nghang,0);
			f.MdiParent=this;
			f.Show();		
		}

		private void menuItem66_Click(object sender, System.EventArgs e)
		{
			/*
			rCandoitk f=new rCandoitk(a,s_chuong,s_lk,s_mmyy);
			f.MdiParent=this;
			f.Show();
			*/
			if (IsLoaded("frmBangcandoitk")) return;
			frmBangcandoitk f=new frmBangcandoitk(a,i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem28_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmDmtk")) return;
			frmDmtk f=new frmDmtk(a,s_mmyy,i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void m61_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmImpnhap")) return;
			frmImpnhap f=new frmImpnhap(a,s_mmyy,s_ngay,i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem23_Click(object sender, System.EventArgs e)
		{
			try
			{
				DataSet ads_menu=new DataSet();
				try
				{
					ads_menu = a.get_data("select * from a_menuitem order by id");
					int i = int.Parse(ads_menu.Tables[0].Rows[0][0].ToString());
				}
				catch
				{
					a.execute_data(" create table a_menuitem(id varchar2(5),id_goc varchar2(5),stt number(5) default 0,id_menu varchar2(5),ten nvarchar2(500)  ,constraint pk_a_menuitem primary key(id))");
					ads_menu = a.get_data("select * from a_menuitem order by id");
				}
				if(ads_menu.Tables[0].Rows.Count<=0)
				{
					frmRight f=new frmRight(a,0,f_get_menu());
					f.MdiParent=this;
					f.Show();
				}
				else
				{
					frmRight f=new frmRight(a,0);
					f.MdiParent=this;
					f.Show();
				}
			}
			catch
			{
			}
		}

		private void menuItem50_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmThongso")) return;
			frmThongso f=new frmThongso(a,s_mmyy,i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem8_Click(object sender, System.EventArgs e)
		{
            if (IsLoaded("frmRight_BV")) return;
			frmRight_BV f=new frmRight_BV(a,f_get_menu());
			f.MdiParent=this;
			f.Show();
		}

		private void m63_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmNhapct")) return;
			frmNhapct f=new frmNhapct(a,s_mmyy,s_ngay,s_chuong,s_lk,s_lctug,s_nghiepvu,5,i_userid,"Chứng từ vật tư - hàng hóa",b_admin,a.lctug_dutoanns_hhoa,0);
			f.MdiParent=this;
			f.Show();		
		}

		private void menuItem80_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmEvent")) return;
			frmEvent f=new frmEvent(a);
			f.MdiParent=this;
			f.Show();
		}

		private void m64_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmDmnhombc")) return;
			frmDmnhombc f=new frmDmnhombc(a,i_userid,s_mmyy);
			f.MdiParent=this;
			f.Show();
		}

		private void m65_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmBkchungtu")) return;
			frmBkchungtu f=new frmBkchungtu(a,s_mmyy,i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem36_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmDmdt")) return;
			frmDmdt f=new frmDmdt(a,s_mmyy,i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem35_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmDmnv")) return;
			frmDmnv f=new frmDmnv(a,s_mmyy,i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem37_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmBcnghang")) return;
			frmBcnghang f=new frmBcnghang(a,i_userid,s_mmyy);
			f.MdiParent=this;
			f.Show();
		}

		private void m4_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmCtgs")) return;
			frmTsctgs f=new frmTsctgs(a,s_mmyy,i_userid);
			f.ShowDialog();
			if (f.mmyy!="")
			{
				frmCtgs f1=new frmCtgs(a,f.mmyy,s_ngay,f.iNhom,f.iChucnang,f.iLctug,f.iChuong,f.iLk,i_userid);
				f1.MdiParent=this;
				f1.Show();
			}
		}

		private void menuItem30_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmDmlk")) return;
			frmDmlk f=new frmDmlk(a,i_userid,s_mmyy);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem29_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmDmnh")) return;
			frmDmnh f=new frmDmnh(a,i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem31_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmBtdkp")) return;
			frmBtdkp f=new frmBtdkp(a,i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void m66_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmDmloaikm")) return;
			frmDmloaikm f=new frmDmloaikm(a,i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void m67_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmDmkhoanmuc")) return;
			frmDmkhoanmuc f=new frmDmkhoanmuc(a,i_userid,s_mmyy);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem32_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmDmng1")) return;
			frmDmng1 f=new frmDmng1(a,i_userid,s_mmyy);
			f.MdiParent=this;
			f.Show();
		}

		private void m68_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmMaubc")) return;
			frmMaubc f=new frmMaubc(a,i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void m6_Click(object sender, System.EventArgs e)
		{
			//frmReportPublic f=new frmReportPublic(a,"SQTM1");
			frmReport_sc f = new frmReport_sc(a,"SQTM1",i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem49_Click(object sender, System.EventArgs e)
		{
			//frmReportPublic f=new frmReportPublic(a,"SDKCTGS");
			frmReportCTGS f = new frmReportCTGS(a,"SDKCTGS");
			f.MdiParent=this;
			f.Show();
		}

		private void m69_Click(object sender, System.EventArgs e)
		{
			//frmReportPublic f=new frmReportPublic(a,"SCTGS");
			frmReportCTGS f = new frmReportCTGS(a,"SCTGS");
			f.MdiParent=this;
			f.Show();
		}

		private void m70_Click(object sender, System.EventArgs e)
		{
			frmSocai_ct_theomuc f = new frmSocai_ct_theomuc(a);
			//frmReportPublic f=new frmReportPublic(a,"SCMUC");
			f.MdiParent=this;
			f.Show();
		}

		private void m71_Click(object sender, System.EventArgs e)
		{
			//frmSocai f=new frmSocai(a);
			frmReport_sc f = new frmReport_sc(a,"SCTH",i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void m72_Click(object sender, System.EventArgs e)
		{
			//frmReportNguon f=new frmReportNguon("SOCAI_S3b",a);
			frmReport_sc f = new frmReport_sc(a,"SOCAI_S3b",i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void m73_Click(object sender, System.EventArgs e)
		{
			//frmReportPublic f=new frmReportPublic(a,"TGNHCT");
			frmReport_sc f=new frmReport_sc(a,"TGNHCT",i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void m74_Click(object sender, System.EventArgs e)
		{
			//frmReportPublic f=new frmReportPublic(a,"TGNHTH");
			frmReport_sc f = new frmReport_sc(a,"TGNHTH",i_userid);
			f.MdiParent=this;
			f.Show();
		}
		private void m13_Click(object sender, System.EventArgs e)
		{
			//frmReportPublic f=new frmReportPublic(a,"STHCN");
			frmReport_sc f = new frmReport_sc(a,"STHCN",i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem48_Click(object sender, System.EventArgs e)
		{
			//frmReportPublic f=new frmReportPublic(a,"STDTU");
			frmReport_sc f = new frmReport_sc(a,"STDTU",i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem58_Click(object sender, System.EventArgs e)
		{
			//frmReportPublic f=new frmReportPublic(a,"BTHCT");
			frmReport_sc f = new frmReport_sc(a,"BTHCT",i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void m16_Click(object sender, System.EventArgs e)
		{
			frmReportNguon f=new frmReportNguon("CTChiDuAn",a,i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void m17_Click(object sender, System.EventArgs e)
		{
			frmReportNguon f=new frmReportNguon("CTChiHoatDong",a,i_userid);
			f.MdiParent=this;
			f.Show();		
		}

		private void m18_Click(object sender, System.EventArgs e)
		{
			frmReportNguon f=new frmReportNguon("TheoDoiNguonKP",a,i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void m19_Click(object sender, System.EventArgs e)
		{
			frmReportNguon f=new frmReportNguon("THNguonKP",a,i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem38_Click(object sender, System.EventArgs e)
		{
			string user=a.user;
			frmDmhachtoan f=new frmDmhachtoan(a,s_mmyy,"select * from "+user+".a_dmtk where c=1 and substr(stk,1,3) in ('461','462')","select * from "+user+".a_dmtk where c=1 and substr(stk,1,3) in ('008','009')",3,"Tài khoản ghi đồng thời - dự toán ngân sách","Số tài khoản","Tài khoản ghi đồng thời",i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem39_Click(object sender, System.EventArgs e)
		{
			string user=a.user;
			frmDmhachtoan f=new frmDmhachtoan(a,s_mmyy,"select * from "+user+".a_dmtk where c=1 and (substr(stk,1,4) in ('4612','6612') or substr(stk,1,3) in ('462','662'))","select * from "+user+".a_dmtk where c=1 and substr(stk,1,3) in ('461','462','661','662')",1,"Tài khoàn năm nay chuyển sang tài khoản năm trước","Số tài khoản năm nay","Số tài khoản năm trước",i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem40_Click(object sender, System.EventArgs e)
		{
			string user=a.user;
			frmDmhachtoan f=new frmDmhachtoan(a,s_mmyy,"select * from "+user+".a_dmtk where c=1 and substr(stk,1,3) in ('461','462')","select * from "+user+".a_dmtk where c=1 and substr(stk,1,3) in ('661','662')",2,"Quyết toán kinh phí đã sử dụng năm trước","Số tài khoản nợ","Số tài khoản có",i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void m3_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmTimct")) return;
			frmTimct f=new frmTimct(a,s_mmyy,s_ngay,s_chuong,s_lk,s_lctug,s_nghiepvu,s_chucnang,i_userid,"Tìm kiếm chứng từ",b_admin);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem22_Click(object sender, System.EventArgs e)
		{
			
		}

		private void menuItem56_Click(object sender, System.EventArgs e)
		{
			frmReport_dtns f = new frmReport_dtns("GiaoDuToan",a,i_userid);
			f.MdiParent=this;
			f.Show();	
		}

		private void menuItem10_Click(object sender, System.EventArgs e)
		{
			frmReport_dtns f = new frmReport_dtns("tc_mKPI",a,i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem60_Click(object sender, System.EventArgs e)
		{
			frmReport_sc f = new frmReport_sc(a,"SCTKT",i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem57_Click(object sender, System.EventArgs e)
		{
			frmReport_dtns f = new frmReport_dtns("NhanDuToan",a,i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem11_Click(object sender, System.EventArgs e)
		{
			frmReport_sc f = new frmReport_sc(a,"SQTMCT",i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem64_Click(object sender, System.EventArgs e)
		{
			frmReport_dtns f = new frmReport_dtns("tc_CTkinhphihoatdong",a,i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem48_Click_1(object sender, System.EventArgs e)
		{
			//frmReportPublic f=new frmReportPublic(a,"SCTTK");
			frmReport_sc f = new frmReport_sc(a,"SCTTK",i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem71_Click(object sender, System.EventArgs e)
		{
			//frmReportPublic f=new frmReportPublic(a,"SCTTK");
			frmReport_sc f = new frmReport_sc(a,"SCTTK_M2",i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem65_Click(object sender, System.EventArgs e)
		{
			frmReport_dtns f = new frmReport_dtns("tc_CTkinhphiduan",a,i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void m95_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmImpxuat")) return;
			frmImpxuat f=new frmImpxuat(a,s_mmyy,s_ngay,i_userid);
			f.MdiParent=this;
			f.Show();			
		}

		private void menuItem63_Click(object sender, System.EventArgs e)
		{
			frmReport_kp f=new frmReport_kp("QuyetToanKP",a,i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem67_Click(object sender, System.EventArgs e)
		{
            frmReport_kp1 f = new frmReport_kp1("ThuChiHoatDongSuNghiepSXKD", a, i_userid);
            f.MdiParent = this;
            f.Show();
		}

		private void menuItem68_Click(object sender, System.EventArgs e)
		{
            frmReport_kp1 f = new frmReport_kp1("TangGiamTSCD", a, i_userid);
            f.MdiParent = this;
            f.Show();
		}

		private void menuItem69_Click(object sender, System.EventArgs e)
		{
            frmReport_kp1 f = new frmReport_kp1("KPChuaSuDung", a, i_userid);
            f.MdiParent = this;
            f.Show();
		}

		private void m83_Click(object sender, System.EventArgs e)
		{
			frmReport_dtns f = new frmReport_dtns("dutoan_nskhobac",a,i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem59_Click(object sender, System.EventArgs e)
		{
			frmReport_dtns f = new frmReport_dtns("TamungKP_KhoBac",a,i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem72_Click(object sender, System.EventArgs e)
		{
			frmReport_dtns f = new frmReport_dtns("TamungKP_KhoBac_TM",a,i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem73_Click(object sender, System.EventArgs e)
		{
			frmReport_sc f = new frmReport_sc(a,"SoNhatKyThuTien",i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem74_Click(object sender, System.EventArgs e)
		{
			frmReport_sc f = new frmReport_sc(a,"SoNhatKyChiTien",i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem75_Click(object sender, System.EventArgs e)
		{
			frmReport_sc f = new frmReport_sc(a,"SoNhatKyMuaHang",i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem77_Click(object sender, System.EventArgs e)
		{
			frmReport_sc f = new frmReport_sc(a,"SoChiTietS31",i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem78_Click(object sender, System.EventArgs e)
		{
			frmReport_sc f = new frmReport_sc(a,"SoChiTietS34",i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem79_Click(object sender, System.EventArgs e)
		{
			frmReport_sc f = new frmReport_sc(a,"SoChiTietS35",i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem81_Click(object sender, System.EventArgs e)
		{
			frmReport_sc f = new frmReport_sc(a,"SoChiPhiSanXuatKD",i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem82_Click(object sender, System.EventArgs e)
		{
			frmReport_sc f = new frmReport_sc(a,"SoTongHopChiPhi",i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem83_Click(object sender, System.EventArgs e)
		{
			frmReport_sc f = new frmReport_sc(a,"SoChiTietChiPhi",i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem84_Click(object sender, System.EventArgs e)
		{
			frmReport_sc f = new frmReport_sc(a,"TongHopTaiKhoanTienGui",i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem76_Click(object sender, System.EventArgs e)
		{
			try
			{
				frmReport_sc f = new frmReport_sc(a,"SoNhatKyBanHang",i_userid);
				f.MdiParent=this;
				f.Show();
			}
			catch (Exception Ex)
			{
				MessageBox.Show("Error : " + Ex ,"Thông báo !");
			}	
				
		}

		private void menuItem86_Click(object sender, System.EventArgs e)
		{			
			frmKetchuyen f = new frmKetchuyen(a,s_mmyy,i_userid,s_yyyy);
			f.MdiParent=this;
			f.Show();
		}
		private void menuItem34_Click(object sender, System.EventArgs e)
		{
			frmDmmlns f = new frmDmmlns(a,i_userid,s_mmyy);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem87_Click(object sender, System.EventArgs e)
		{
			frmReport_kp1 f=new frmReport_kp1("BangCanDoiKeToan",a,i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem88_Click(object sender, System.EventArgs e)
		{
			frmReport_kp1 f=new frmReport_kp1("KetQuaHoatDongKinhDoanh",a,i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem89_Click(object sender, System.EventArgs e)
		{
			frmReport_kp1 f=new frmReport_kp1("LuuChuyenTienTe",a,i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem90_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmDutoanns")) return;
			frmDutoanns f=new frmDutoanns(a,s_mmyy,s_ngay,s_chuong,s_lk,i_userid,"Dự toán được giao tháng "+s_mmyy.Substring(0,2)+" năm 20"+s_mmyy.Substring(2),b_admin);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem22_Click_1(object sender, System.EventArgs e)
		{
			//frmReportPublic f=new frmReportPublic(a,"SCTTK");
			frmReport_sc f = new frmReport_sc(a,"SCTTK_",i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem92_Click_1(object sender, System.EventArgs e)
		{
			if(IsLoaded("frmReport_sc")) return;
			frmReport_sc f = new frmReport_sc(a,"BTHCT",i_userid);
			f.MdiParent=this;
			f.Show();
		}

	
		private void menuItem94_Click(object sender, System.EventArgs e)
		{
			if(IsLoaded("frmReport_kp1")) return;
			frmReport_kp1 f=new frmReport_kp1("BaoCaoChiTietThu",a,i_userid);
			f.MdiParent=this;
			f.Show();
 
		}

		private void menuItem95_Click(object sender, System.EventArgs e)
		{
			if(IsLoaded("frmReport_sc")) return;
			frmReport_sc f = new frmReport_sc(a,"BKCTGCL",i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem4_Click(object sender, System.EventArgs e)
		{
		
		}

		private void m121_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmImpvienphi")) return;
			frmImpvienphi f=new frmImpvienphi(a,s_mmyy,s_ngay,i_userid);
			f.MdiParent=this;
			f.Show();		
		}

		private void m124_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmHopdong")) return;
			frmHopdong f=new frmHopdong(a,s_mmyy,s_ngay,i_userid,b_admin);
			f.MdiParent=this;
			f.Show();
		}

		private void m122_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmCongno_Nguon")) return;
			frmCongno_Nguon f=new frmCongno_Nguon(a,1);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem93_Click(object sender, System.EventArgs e)
		{
			if(IsLoaded("frmReport_kp1")) return;
			frmReport_kp1 f=new frmReport_kp1("KPSN-HDSXKD",a,i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem93_Click_1(object sender, System.EventArgs e)
		{
			Frmbctaichinh f=new Frmbctaichinh(a,i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem96_Click(object sender, System.EventArgs e)
		{
			frmReport_dtns f = new frmReport_dtns("tc_mKPI_longan",a,i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem97_Click(object sender, System.EventArgs e)
		{
			frmReport_kp f=new frmReport_kp("QuyetToanKP_longan",a,i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem98_Click(object sender, System.EventArgs e)
		{
			frmReportNguon f=new frmReportNguon("CTChiHoatDong_longan",a,i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem27_Click_1(object sender, System.EventArgs e)
		{
			if(IsLoaded("frmdmnguonns"))return;
			frmdmnguonns f=new frmdmnguonns(a,i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem11_Click_1(object sender, System.EventArgs e)
		{
		    if(IsLoaded("frmImpvienphi")) return;
			frmImpvienphi f=new frmImpvienphi(a,s_mmyy,s_ngay,i_userid);
			f.MdiParent=this;
			f.Show();
		}

        private void m125_Click(object sender, EventArgs e)
        {

        }

        private void m78_Click(object sender, EventArgs e)
        {
            if (IsLoaded("frmDmngoaite")) return;
            frmDmngoaite f = new frmDmngoaite(a, s_ngay, i_userid);
            f.MdiParent = this;
            f.Show();
        }

        private void menuItem12_Click_1(object sender, EventArgs e)
        {
            //frmReportNguon f=new frmReportNguon("SOCAI_S3b",a);
            frmReport_sc f = new frmReport_sc(a, "SOHANGMUCKINHPHI", i_userid);
            f.MdiParent = this;
            f.Show();
        }

        private void menuItem13_Click_1(object sender, EventArgs e)
        {
            if (IsLoaded("frmReport_kp1")) return;
            frmReport_kp1 f = new frmReport_kp1("BaoCaoChiTietChi", a, i_userid);
            f.MdiParent = this;
            f.Show();
        }

        private void menuItem14_Click_1(object sender, EventArgs e)
        {
            if (IsLoaded("frmDmTSCD")) return;
            frmDmTSCD f = new frmDmTSCD(a, i_userid, s_mmyy);
            f.MdiParent = this;
            f.Show();
        }

        private void menuItem15_Click(object sender, EventArgs e)
        {
        
        }

        //private void menuItem15_Click(object sender, EventArgs e)
        //{
        //    if (IsLoaded("frmDmloaiTSCD")) return;
        //    frmDmloaiTSCD f = new frmDmloaiTSCD(a, i_userid);
        //    f.MdiParent = this;
        //    f.Show();
        //}

        	
	}
}
